package ioccontainer;
import java.util.List;

import parser.Parser;
import parser.ParserTypes;
import parser.StAXParser;

public class XMLBeanDefinitionReader {

	private Parser parser;
	private List<BeanDefinition> beanDefinitions;

	public void loadBeanDefinitions(String xmlPath) {
		beanDefinitions = parser.parseBeanDefinitions(xmlPath);
	}

	public void setParserType(ParserTypes parserType) {
		switch (parserType) {
		case DOM:
			System.out.println("Not supported yet");
			break;
		case SAX:
			System.out.println("Not supported yet");
			break;
		case StAX:
			parser = new StAXParser();
		}
	}

	public List<BeanDefinition> getBeanDefinitions() {
		return beanDefinitions;
	}

}
